package com.heima.admin.controller;

import com.heima.admin.service.AdminService;
import com.heima.model.admin.dto.AdminLoginDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/login")
public class AdminController {

    @Autowired
    private AdminService adminService;
    /**
     * 管理平台登陆
     * @param adminLoginDto
     * @return
     */
    @PostMapping("/in")
    public ResponseResult login(@RequestBody AdminLoginDto adminLoginDto){

        return adminService.login(adminLoginDto);
    }
}
